Field of the Invention
The present invention relates to a printing apparatus that is connectable with Wi-Fi direct, a method of controlling the same, and a storage medium.
Description of the Related Art
Conventionally, there has been proposed an information processing apparatus, such as an MFP (Multi-Function Printer), a PC, a smartphone, a tablet terminal, or the like, which has a Wi-Fi direct function (see e.g. Japanese Patent Laid-Open Publication No. 2014-107859). The Wi-Fi direct function is one of wireless LAN standards, for connecting between information processing apparatuses both equipped with the Wi-Fi direct function, with Wi-Fi direct without using a wireless LAN router. When the information processing apparatuses are connected to each other with Wi-Fi direct, an application is started in one of the information processing apparatuses, such as a smartphone, and the other of the information processing apparatuses, such as an MFP, performs various processing according to the operation of the started application.
Incidentally, the maximum number of information processing apparatuses simultaneously connected to the MFP with Wi-Fi direct (hereinafter referred to as the “maximum connection number”) is determined in advance, and if the number of information processing apparatuses connected to the MFP with Wi-Fi direct connection has already reached the maximum connection number, a new information processing apparatus cannot be connected to the MFP with Wi-Fi direct. To prevent a new information processing apparatus from becoming incapable of being connected to the MFP with Wi-Fi direct, the Wi-Fi direct connection between the MFP and the information processing apparatus, such as a smartphone, is automatically disconnected according to a connection time period over which the smartphone has been connected to the MFP with Wi-Fi direct.
However, in a case where an application is started in the smartphone and the started application is operated, it takes a certain time period to complete the operation of the application, and hence the Wi-Fi direct connection between the MFP and the smartphone is sometimes disconnected during the operation of the application. When the Wi-Fi direct connection is disconnected, the operation of the application is interrupted. As a result, the user is required to start the operation of the application from the beginning again after resuming Wi-Fi direct connection, which causes a problem that processing intended by the user is not smoothly performed.